import worker, { MessageEvents } from '@ohos.worker';
import { get100kFile } from '../common/PostAndGetFiles'

let parentPort = worker.workerPort; // 获取parentPort属性

// 接收宿主线程的数据
parentPort.onmessage = async (e: MessageEvents) => { // 定义onmessage方法
  let data: ESObject = e.data
  //console.log(TAG,"onmessageData222")
  const newData = await get100kFile()
  parentPort.postMessage(newData) // 返回值
}
